<template>
	<view>
		<view class="record-item" @click="goDetail(item.id)" v-for="item in operatorList" :key="item.id">
			<view class="item-title">
				<view class="left-border"></view>
				<view class="left">{{item['人员名称']}}</view>
				<view class="right">{{workStatus[item['工作状态']]}}</view>
			</view>
			<view class="item-content">
				<view class="content-top">
					<view>手机号码 ：{{item['手机号']}}</view>
					<view @click.stop="goLeave(item)" class="handle normal">去请假</view>
				</view>
				<view class="content-center">负责小区 ：{{item['所有负责项目']}}</view>
				<view class="content-bottom">
					<view class="type">负责工单类型 ：{{item['负责工单类型'] ? item['负责工单类型'].join(',') : '无'}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['operatorList'],
		data() {
			return {
				ticketType: this.$type.ticketType,
				workStatus: this.$type.workStatus
			};
		},
		methods: {
			goDetail(id) {
				this.$emit('detail', id)
			},
			goLeave(item) {
				this.$emit('leave', item)
			}
		}
	}
</script>

<style>

</style>
